$(function () {
    console.log("init");
    $.ajax({
        url: "/a",
        method: "get",
        data: {
            name: name,
            password: this.password
        },
        success: function (res) {
            console.log("数据返回");
            console.log(res);
        }
    });
})

function login() {
    var name = $("input[name='name']").val();
    var pass = $("input[password='password']").val();

    $.ajax({
        url: "/a",
        method: "get",
        data: {
            name: name,
            password: pass
        },
        success: function (res) {
            console.log("数据返回");
            console.log(res);

            if (res.status == 0) {
                alert("成功")
            } else {
                alert("成功")
            }
        }
    });
}

